//templete
@mixin bor-r($radius: 2px) {
    border-radius: $radius;
    -moz-border-radius: $radius;
    -webkit-border-radius: $radius;
}

@mixin flex($scale:1) {
    display: block;
    -moz-box-flex: $scale;
    -webkit-box-flex: $scale;
    box-flex: $scale;
}

@mixin ellip-def {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

@mixin ellip($row:1) {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: $row;
    -webkit-box-orient: vertical;
}

@mixin animate($time:0.3s) {
    -webkit-transition: all $time;
    -o-transition: all $time;
    transition: all $time;
}

@mixin alink() {
    text-decoration: none;
    color: inherit;
}

@mixin tp() {
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    background-color: rgba(0, 0, 0, 0) !important;
}

@mixin box_sizing() {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

@mixin animate_name($name) {
    animation-name: $name;
    -moz-animation-name: $name;
    /* Firefox */
    -webkit-animation-name: $name;
    /* Safari and Chrome */
    -o-animation-name: $name;
    /* Opera */
}

@mixin animate_duration($time:0.3s) {
    animation-duration: $time;
    -moz-animation-duration: $time;
    /* Firefox */
    -webkit-animation-duration: $time;
    /* Safari and Chrome */
    -o-animation-duration: $time;
    /* Opera */
}

@mixin cicle($size:28px) {
    flex-shrink: 0;
    display: inline-block;
    width: $size;
    height: $size;
    border-radius: 100%; // border: solid 1px #ccc;
    overflow: hidden;

    >img {
        width: 100%;
        height: 100%;
    }
}

@mixin square($size:28px) {
    flex-shrink: 0;
    display: inline-block;
    width: $size;
    height: $size;
    overflow: hidden;

    >img {
        width: 100%;
        height: 100%;
    }
}

@mixin paper($radius) {
    background: $paper_bg;
    color: $paper_color;
    border-radius: $radius;
}

@mixin flex($scale:1) {
    display: block;
    flex: $scale;
}

@mixin animate($time:0.3s) {
    transition: all $time;
}

@mixin shadow($color:$shadow_color) {
    box-shadow: $color;
}

//限制一行的情况需要另外处理
@mixin ellip($row:2) {
    display: -webkit-box;
    overflow: hidden;
    box-orient: vertical;
    -webkit-line-clamp: $row;
    -webkit-box-orient: vertical;
}

@mixin btn($size:0px) {
    display: inline-block;
    border-radius: $size;
    text-align: center;
    cursor: pointer;

    &:disabled {
        cursor: not-allowed;
        color: #fff !important;
        background-color: $disable !important;
    }

    &:active {
        opacity: .8;
    }

    outline: none !important;

    &:focus {
        outline: none !important;
    }
}

@mixin hoverWave($hoverColor:$hoverWaveColor) {
    position: relative;
    overflow: hidden;

    &:after {
        content: '';
        position: absolute;
        top: 50%;
        right: -100%;
        transform: scale(0);
        width: 100%;
        height: 100%;
        border-radius: 200px;
        background-color: rgba($color:$hoverColor, $alpha: .1);
        // background-color: $hoverColor;
        transition: all .3s;
        // z-index: -1;
    }

    &:hover {
        &:after {
            transform: scale(3.5);
            left: -100%;
            right: unset;
        }
    }
}

@mixin disableOutline() {
    outline: none !important;

    &:focus {
        outline: none !important;
    }
}
